package com.kymatrix.mpo.plus.bpm.server.dao.definition;

import com.kymatrix.mpo.plus.bpm.server.model.entity.definition.BpmProcessDefinitionInfoEntity;
import com.kymatrix.mpo.plus.bpm.server.config.mybatis.mapper.BaseMapperX;
import java.util.Collection;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface BpmProcessDefinitionInfoMapper extends BaseMapperX<BpmProcessDefinitionInfoEntity> {

    default List<BpmProcessDefinitionInfoEntity> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
        return selectList(BpmProcessDefinitionInfoEntity::getProcessDefinitionId, processDefinitionIds);
    }

    default BpmProcessDefinitionInfoEntity selectByProcessDefinitionId(String processDefinitionId) {
        return selectOne(BpmProcessDefinitionInfoEntity::getProcessDefinitionId, processDefinitionId);
    }

}
